//
//  componentAHelper.h
//  componentA
//
//  Created by dev on 04/09/2018.
//  Copyright (c) 2018 GMS. All rights reserved.
//

#import "componentAHelper.h"

NSBundle *componenta_resourceBundle(Class class) {
    static NSBundle *componentABundle = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        componentABundle = [NSBundle bundleForClass:class];
        if (componentABundle) {
            NSString *resourceBundlePath = [componentABundle pathForResource:@"componentABundle" ofType:@"bundle"];
            if (resourceBundlePath && [[NSFileManager defaultManager] fileExistsAtPath:resourceBundlePath]) {
                componentABundle = [NSBundle bundleWithPath:resourceBundlePath];
            }
        }
    });
    return componentABundle;
}

@implementation componentAHelper

@end
